package com.jwgf.group;

import com.jwgf.adapter.ItemViewDelegate;
import com.jwgf.adapter.RecyclerViewHolder;
import com.jwgf.objectbox.SpindleParameter;
import com.jwgf.smarowindingmachine_unity.R;

public class CraftDelegate implements ItemViewDelegate {
    @Override
    public int getItemViewLayoutId() {
        return R.layout.navigation_button;
    }

    @Override
    public boolean isForViewType(Object item, int position) {
        return item instanceof SpindleParameter;
    }

    @Override
    public void bindView(RecyclerViewHolder holder, Object o, int position) {
        SpindleParameter parameter = (SpindleParameter) o;
        holder.setText(R.id.btn, parameter.craftName);
    }
}
